package com.nice.web;

import com.nice.main.Bootstart;
import com.nice.service.Service;

public class WebService implements Service {

	private JettyServer server;

	@Override
	public void start(Bootstart bt) {
		String ctxPath = "/";
		String resBase = "./webapp";
		String jettyXml = "./jetty/etc/jetty.xml";
		String webXmlPath = "./webapp/WEB-INF/web.xml";
		server = new JettyServer(jettyXml, ctxPath, resBase, webXmlPath);
		server.startServer();
	}

	@Override
	public void stop(Bootstart bt) {
		try {
			server.stop();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
